﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Header.Master" AutoEventWireup="true" CodeBehind="Settings.aspx.cs" Inherits="geekmeet.Settings" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" type="text/javascript"></script>
    <script src="../Scripts/geekmeet.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="mainWrapper">
     <asp:SiteMapPath ID="SiteMapPath1" runat="server" CssClass="breadcrumbs" 
        ParentLevelsDisplayed="1">

        </asp:SiteMapPath>

             <div style="display:none"> 
                <div id="deleteAccountDialog" title="Radera konto">Ditt konto kommer att raderas permanent! </div>
            </div>

        <h1 class="pageHeader">Kontoinställningar</h1>
        <div id="settingsSiteOptions">
            <h2 class="headerBanner">Sajten</h2>
            <p><asp:CheckBox ID="chkVisible" runat="server" Text="Visa mig i sökresultaten" 
                ClientIDMode="Predictable" AutoPostBack="True" oncheckedchanged="chkVisible_CheckedChanged" 
                    /><br/>
                
                <br />
                
                <a href="?action=ExportProfile">Exportera profil</a>
                <br />
                
                
                <a href="#" onclick="showDeleteAccountDialog()">Avsluta mitt konto</a>
            </p>

        </div>

    <div id="settingsPremiumContent">
    <h2 class="headerBanner">Premium</h2>
    
        <asp:Panel ID="panIsPremium" runat="server" Visible="False">
            <p>Du är premiummedlem till
                <asp:Label ID="lblPremiumExpiryDate" runat="server" Text="Label"></asp:Label>
            </p>
        </asp:Panel>
            <asp:Panel ID="panIsNotPremium" runat="server" Visible="False">
           <p class="inline">Du har inte Premium.</p>
                
                <span class="button"><a href="#" onclick="showPurchasePremium()">Skaffa nu!</a></span>

                <div ID="settingsGetPremium">
                    <table>
                        <tr>
                            <td>
                                Korttyp
                            </td>
                            <td>
                                <div class="cardSelection">
                                    <img src="../images/icons/Mastercard-icon.png" alt="Mastercard" title="Mastercard" />
                                </div>
                                <div class="cardSelection">
                                    <img src="../images/icons/VISA-icon.png" alt="VISA" title="VISA" />
                                </div>
                                <div class="cardSelection">
                                    <img src="../images/icons/visa-electron-icon.png" alt="VISA Electron" title="VISA Electron" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Förnamn</td>
                            <td>
                                <asp:TextBox ID="txtFirstName" runat="server" MaxLength="30"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ControlToValidate="txtFirstName" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                    ControlToValidate="txtFirstName" CssClass="errorText" 
                                    ErrorMessage="Endast bokstäver" ForeColor="Red" 
                                    ValidationExpression="[aA-öÖ]{2,}"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Efternamn</td>
                            <td>
                                <asp:TextBox ID="txtLastName" runat="server" MaxLength="30"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="txtLastName" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                                    ControlToValidate="txtFirstName" CssClass="errorText" 
                                    ErrorMessage="Endast bokstäver" ForeColor="Red" 
                                    ValidationExpression="[aA-öÖ]{2,}"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Kortnummer</td>
                            <td>
                                <asp:TextBox ID="txtCardNumber" runat="server" MaxLength="16"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                    ControlToValidate="txtCardNumber" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                    ControlToValidate="txtCardNumber" ErrorMessage="*" ForeColor="Red" 
                                    ValidationExpression="^[0-9]{16}$"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Utgångsdatum</td>
                            <td>
                                <asp:DropDownList ID="ddlMonth" runat="server">
                                    <asp:ListItem Selected="True">Månad</asp:ListItem>
                                </asp:DropDownList>
                                <asp:RangeValidator ID="RangeValidator1" runat="server" 
                                    ControlToValidate="ddlMonth" ErrorMessage="*" ForeColor="Red" MaximumValue="99" 
                                    MinimumValue="1" SetFocusOnError="False"></asp:RangeValidator>
                                <asp:DropDownList ID="ddlYear" runat="server">
                                    <asp:ListItem Selected="True">År</asp:ListItem>
                                </asp:DropDownList>
                                <asp:RangeValidator ID="RangeValidator2" runat="server" 
                                    ControlToValidate="ddlYear" ErrorMessage="*" ForeColor="Red" MaximumValue="99" 
                                    MinimumValue="1"></asp:RangeValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                CVV</td>
                            <td>
                                <asp:TextBox ID="txtCVV" runat="server" Columns="3" MaxLength="3"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                    ControlToValidate="txtCVV" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                    ControlToValidate="txtCVV" ErrorMessage="*" ForeColor="Red" 
                                    ValidationExpression="^[0-9]{3}$"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Button ID="BtnConfirmTransaction" runat="server" onclick="BtnConfirmTransaction_Click" 
                                    Text="Bekräfta" />
                            </td>
                        </tr>
                    </table>
                </div>

        </asp:Panel>            
        
        <h3><a href="#" onclick="showPremiumHistory()">Köphistorik</a></h3>
        <div id="settingsPremiumHistory">
        
        <table id="tableHistory" width="100%">
            <tr>
                <th>Datum</th>
                <th>Kortnummer</th>
            </tr>
            <asp:Repeater ID="historyRepeater" runat="server">
            <ItemTemplate>
                <tr>
                    <td><%#Eval("TransactionDate") %></td>
                    <td>**** **** **** <%#Eval("CardNumberLastDigits") %></td>
                 </tr>
            </ItemTemplate>
            
            </asp:Repeater>
            
            
        </table>
        </div>

    
   
    </div>
    </div>
</asp:Content>
